# /usr/bin/env python3.6
# -*- encoding: utf-8 -*-
"""
@File    : utils.py
@Time    : 2020/2/7 0007 11:35
@Author  : zhangbing
@Email   : 18829172841@163.com
@Software: PyCharm
"""
import uuid

from App.setting import UPLOAD_DIR, FILE_PATH_PREFIX


def filename_transfer(filename):
    ext_name = filename.rsplit(".")[1]
    new_filename = uuid.uuid4().hex + "." + ext_name
    save_path = UPLOAD_DIR + "/" + new_filename  # 文件存储路径
    upload_path = FILE_PATH_PREFIX + "/" + new_filename  # 文件显示路径
    return save_path, upload_path


if __name__ == "__main__":
    pass
